#include "Point.h"

Point::Point(Vector3f * point)
{
	mPoints = point;
}

Point::~Point(void)
{
}

int Point::returnType()
{
	return AShape::TYPE_POINT;
}
void Point::drawGL()
{
	glColor3f((*mColor)[0],(*mColor)[1],(*mColor)[2]);
	glBegin(GL_POINTS);
	glVertex3d(mPoints[0][0],mPoints[0][1],mPoints[0][2]);
	glEnd();
}

Vector3f* Point::clickOnMarker(Vector2f* mousePos, int indexX, int indexY, int markerRadius)
{
	float mouseX = (*mousePos)[0];
	float mouseY = (*mousePos)[1];

	if (mouseX > (mPoints[0][indexX]-markerRadius) && mouseX < (mPoints[0][indexX]+markerRadius))
	{
		if (mouseY > (mPoints[0][indexY]-markerRadius) && mouseY < (mPoints[0][indexY]+markerRadius))
		{
			return &mPoints[0];
		}
	}
	return NULL;
}

float Point::perimeterLength()
{
	return 0;
}
